<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>模板</title>
  </head>
  <body>
    <!-- 准备好一个容器 -->
    <div id="test"></div>

    <!-- 引入react核心库 -->
    <script type="text/javascript" src="../js/react.development.js"></script>
    <!-- 引入react-dom，用于支持react操作DOM -->
    <script
      type="text/javascript"
      src="../js/react-dom.development.js"
    ></script>
    <!-- 引入babel，用于将jsx转换成js -->
    <script type="text/javascript" src="../js/babel.min.js"></script>
    <script type="text/babel">
      //   class Person {
      //     constructor(name, age) {
      //       this.name = name;
      //       this.age = age;
      //     }

      //     study() {
      //       console.log(this);
      //     }
      //   }

      //   const p1 = new Person("tom", 18);

      //   p1.study();
      //   const x1 = p1.study;
      //   x1();

      function demo() {
        "use strict";
        console.log(this);
      }

      function demo2() {
        console.log(this);
      }

      demo();

      demo2();
    </script>
  </body>
</html>
